#ifndef __RPC_H__
#define __RPC_H__
#ifndef _PACK_H_RPCGEN
#define _PACK_H_RPCGEN

#include <rpc/rpc.h>

//#define MAKESVC
//#define MAKECLNT

#define SVC_FUN_NUM 3
 typedef  void * (*SVC_FUN_POINT) (void *);
 typedef struct svc_fun
 {
 	int fun_id;
 	SVC_FUN_POINT svc_fun ;
 }SVC_FUN;

struct RPC_PACK {
	int fun_id;
	int clnt_id;
	u_int usr_data_len;
	char *usr_data_val;	
};
typedef struct RPC_PACK RPC_PACK;

#define PACK 87654321
#define VERSION 1

#define RPC_DISPATCH 1
extern  void *  rpc_req(char * host, int fun_id, void* data, int len);
extern  void * rpc_dispatch(RPC_PACK *, struct svc_req *);
extern int pack_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
extern int rpc_svc_run ();

/* the xdr functions */
extern  bool_t xdr_RPC_PACK (XDR *, RPC_PACK*);

#endif /* !_PACK_H_RPCGEN */
#endif